# == Schema Information
#
# Table name: webs
#
#  id         :integer(4)      not null, primary key
#  title      :string(255)
#  name       :string(255)
#  sort_name  :string(255)
#  sort       :integer(4)      default(1)
#  body       :text
#  created_at :datetime
#  updated_at :datetime
#

class Web < ActiveRecord::Base
  validates_uniqueness_of :name ,:title
#  validates_length_of :title , :maximum => 255
#  validates_length_of :description , :maximum => 255
#  validates_length_of :keyword , :maximum => 255
  validates_length_of :name , :title ,:maximum => 255
  validates_length_of :sort_name , :title ,:maximum => 20
  validates_presence_of :name
    validates_format_of :name,
    :with => /^[0-9a-zA-Z]+$/

end
